package com.example.test.akka.demo01;

import akka.actor.AbstractActor;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import org.apache.camel.CamelContext;
import org.apache.camel.RoutesBuilder;

/**
 * @author 晓果冻
 * @version 1.0
 * @date 2021/11/6 12:52
 */
public class Main extends AbstractActor {

    public static void main(String[] args) throws Exception {
        //参数不能为汉字
        ActorSystem actorSystem = ActorSystem.create("name");
        //name不能为汉字
        ActorRef actorRef = actorSystem.actorOf(Props.create(Test.class),"I-am-tony");
        //没有执行tell的话，不会执行createReceive中的return
        actorRef.tell("我告诉你",ActorRef.noSender());
    }

    @Override
    public Receive createReceive() {
        return null;
    }
}
